<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/tags.jsp"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>增加菜单</title>
<%@ include file="/WEB-INF/jsp/common/ui.jsp"%>
</head>
<body>
	<div id="dd" class="easyui-draggable easyui-resizable"
		data-options="handle:'#mymailform'"
		style="width: 500px; height: 280px; border: 1px solid #ccc">
		<div style="padding: 5px; width: 500px" id="mymailform">拖动</div>
		<div class="easyui-panel" title="" style="width: 500px">
			<div style="padding: 10px 0 10px 60px">

				<form:form action="saveMenu.do" method="post" commandName="menu"
					id="mailForm" target="mailiframe">
					<table>
						<tr>
							<td>名称:</td>

							<td> 
							<form:hidden path="id"/>
							<form:input path="name" style="width: 200px; hight: 100px;" class="easyui-validatebox"
								 data-options="required:true"/>
							</td>
						</tr>
						<tr>
							<td>父菜单:</td>
							<td>
							<form:input path="pid" class="easyui-combotree" data-options="url:'/ysssy/admin/menu',method:'get'"	style="width: 200px;"/>
							</td>
						</tr>
						<tr>
							<td>类型:</td>
							<td><form:select class="easyui-combobox" path="type" style="width:130px;" data-options="required:true">
							<form:option value="1">导航菜单</form:option>
							<form:option value="2">功能权限</form:option>
							</form:select></td>
						</tr>
						<tr>
							<td>URL:</td>
							<td>
							 <form:input class="easyui-validatebox" style="width:230px;" type="text" path="pageUrl" data-options="required:true"/>
							 </td>
						</tr>
						<tr>
							<td>菜单排序:</td>

							<td><form:input class="easyui-validatebox" style="width:230px;" type="text" path="sortFiled" data-options="required:true"/> (按照升序排列)
							</td>
						</tr>
						<tr>
							<td>描述:</td>
							<td><form:textarea path="description" cols="20" rows="3"/>
							</td>
						</tr>
						<tr>
							<td colspan="2"><input type="submit"
								class="easyui-linkbutton" value="提交"> <input
								type="reset" value="清除数据"></td>
						</tr>
					</table>
				</form:form>
				<form:errors />
			</div>
			<div style="text-align: center; padding: 5px"></div>
		</div>
	</div>


</body>
<script type="text/javascript">
	$(function() {

		$('#mailForm').form({
			url : '<%=path%>/menu/save',
			onSubmit : function() {
				return $(this).form('validate');
			},
			success : function(data) {
				$.messager.alert("操作提示", data);

			}
		});

		$('#menupid').combotree({
			panelHeight : 320

		});
	});

	function clearForm() {

		$('#mailForm').form('clear');
	}
</script>
</html>